package com.qd.panda.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 用户预约单
 *
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@TableName("panda_user_stroke_appointment_order")
public class UserStrokeAppointmentOrder extends Model<UserStrokeAppointmentOrder> implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "order_id", type = IdType.ASSIGN_ID)
    private String orderId;
    /**
     * 开始时间
     */
    @TableField("appointment_time")
    private LocalDateTime appointmentTime;
    /**
     * 订单金额
     */
    @TableField("order_amount")
    private BigDecimal orderAmount;
    /**
     * 支付状态:0未支付 1支付成功 2支付失败
     */
    @TableField("pay_status")
    private Integer payStatus;
    /**
     * 停车场
     */
    @TableField("park_id")
    private String parkId;
    /**
     * 用户ID
     */
    @TableField("user_id")
    private String userId;
    /**
     * 车牌
     */
    @TableField("plate_number")
    private String plateNumber;
    /**
     * 行程ID
     */
    @TableField("sid")
    private String sid;
    /**
     * 行程类型:0停车1充电
     */
    @TableField("trip_type")
    private Integer tripType;
    /**
     * 推广码
     */
    @TableField("promotion_code")
    private String promotionCode;

    public void freeData() {
        this.orderId = null;
        this.appointmentTime = null;
        this.orderAmount = null;
        this.payStatus = null;
        this.parkId = null;
        this.userId = null;
        this.plateNumber = null;
        this.sid = null;
        this.tripType = null;
        this.promotionCode = null;
    }

}
